package com.ldkj.msg.user.service.impl;

import com.ldkj.msg.user.service.MsgService;
import com.ldkj.msg.user.mapper.MsgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class MsgServiceImpl implements MsgService {
    @Autowired
    private MsgMapper mapper;

    @Override
    public int addRcontact(String username,
                           String nickname){

        return mapper.addRcontact(username,nickname);

    }
    @Override
    public int addChatroom(String memberlist,
                           String displayname){
        return mapper.addChatroom(memberlist,displayname);

    }

    @Override
    public int addMessage(String msgid,
                          String createtime,
                          String talker,
                          String content,
                          String username){

        return mapper.addMessage(msgid,
                createtime,
                talker,
                content,
                username);
    }
    @Override
    public List<Map> getMsgByRoom(String room){
        return mapper.getMsgByRoom(room);
    }

}